﻿<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.Utility%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.BLL%>
<script language="javascript" src="/support/editor/script_common.js"></script>
<script language="javascript" src="/support/editor/editor_function.js"></script>

<div class="layout31">
    
      <div class="col1">
      
      <div class="box">
      <div class="content">
      
      <div class="newtopic">
      <%csharp%>TempUrl = "/Group/TopicAdd.aspx?gid=" + GroupData.Id; <%/csharp%>
      <a href="{GetUrl(TempUrl)}"><span  onmouseout="this.className='new_sbt'" onmouseover="this.className='new_sbt_h'" onclick="SubmitForm('3');" class="new_sbt">发新话题</span></a>
      
      
      <%csharp%>TempUrl = "/Group/ReplyAdd.aspx?gid=" + GroupData.Id+"&tid=" + TopicData.Id; <%/csharp%>
      <a href="{GetUrl(TempUrl)}"><span  onmouseout="this.className='new_sbt'" onmouseover="this.className='new_sbt_h'" onclick="SubmitForm('3');" class="new_sbt">回复</span></a>
      </div>
      <div style="float:right;">
      <div class="pages">{PagingString}</div>
      </div>
           <div style=" clear:both;"></div>
      </div>
      </div>
      
      
        <%csharp%>TempUrl = ModuleCtrl.Header4("moduleTopic","{TopicData.Title}",true,false); <%/csharp%>
        {TempUrl}    
        <div class="qtopicdata">
        <%csharp%>if(_pageIndex==1){<%/csharp%>
        <table cellspacing="0" cellpadding="0" width="730px">
	    <thead>
		    <tr>
			    <td colspan="2">																																									
				<strong>主题：<span>{TopicData.Title}</span></strong>
				浏览：{TopicData.Hits} &nbsp;&nbsp;回复：{TopicData.ReplyCount}
		    </tr>
	    </thead>
	    <tbody>
		<tr>
			<th>
				
				<%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + TopicData.PostUserId; <%/csharp%>
				<a href="{this.GetUrl(TempUrl)}" class="user_img" target="_blank"><img src="{TopicData.PostAvatar}" width="100px" height="100px"/></a>
				<h1><a class="link_strong"  href="{this.GetUrl(TempUrl)}" target="_blank">{TopicData.PostUserName}</a></h1>
				
				<%csharp%>
				string province=UserBLL.Instance.GetUserInfo(TopicData.PostUserId).Province;
				string city=UserBLL.Instance.GetUserInfo(TopicData.PostUserId).City;
				<%/csharp%>
				<%if province!=""||city!=""%>
				<p>({province}&nbsp;{city})</p>
				<%/if%>
				

				<p>性别：{TopicData.PostGender}&nbsp;&nbsp;年龄：<%if TopicData.PostAge<208&&TopicData.PostAge>0%>{TopicData.PostAge}<%else%>未知<%/if%></p>
				
				<p>
				<%csharp%>TempUrl = "/User/FriendAdd.aspx?uid=" + TopicData.PostUserId;<%/csharp%>
  			    <a href="javascript:showFriendRequestDialog('{TopicData.PostUserId}','{TopicData.PostUserName}','{TopicData.PostAvatar}');"class="addfriend">加为好友</a>
  			    <%csharp%>TempUrl = "/User/PostPm.aspx?msgto=" + TopicData.PostUserId;<%/csharp%>
				<a href="{GetUrl(TempUrl)}"class="sendpm" target="_blank">发送消息</a>
				 </p>
			</th>
			<td>
				<div class="list_inside">
				       
				{TopicData.Body}
				
				<br />附件：<%csharp%>TempUrl = "http://www.youhp.com" + TopicData.TopicFile; <%/csharp%><a href="{TopicData.TopicFile}" style="text-decoration:underline" >{FileRealName}</a></div>				
			</td>
		</tr>
	    </tbody>
	    <tfoot>
		<tr>
			<th>楼主</th>
			<td>
				<span>
			<!--	<a href="javascript:void(0)" onclick="popupBox({GroupData.Id},{TopicData.Id});" id="topic_{TopicData.Id}">
				操作<img height="14" border="0" align="top" width="14" src="/support/Alpha/images/opmenu.gif"/>
				</a>-->
					<%csharp%>if(CanEdit(TopicData)) { <%/csharp%>
                    <%csharp%>TempUrl = "/Group/TopicEdit.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id ; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green">修改</font></a>]
                    <%csharp%> } <%/csharp%>
            
                    <%csharp%>if(CanDelete(TopicData)) { <%/csharp%>
                    <%csharp%>TempUrl = "/Group/TopicDel.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id ; <%/csharp%>
                    [<a href="#" onclick="if(window.confirm('删除帖子将同时删除该帖子全部回复，确定删除？')) window.location.href='{this.GetUrl(TempUrl)}';"><font style="color:Green">删除</font></a>]
                    <%csharp%> } <%/csharp%>

        
                    <%csharp%>if(CanReply(TopicData)) { <%/csharp%>
                    <%csharp%>TempUrl = "/Group/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green">回复</font></a>]
                    <%csharp%> } <%/csharp%>  
			    </span>
			    <%csharp%>TempUrl = TopicData.PostTime.ToString("yyyy-MM-dd hh:mm"); <%/csharp%>
				<em class="color_weak">发表日期：{TopicData.PostTime}</em>
			</td>

		</tr>
	    </tfoot>
        </table>
           <script type="text/javascript">
           function popupBox(gid,tid)
           {
              var point = getDropdownPoint(gbid('topic_'+tid));
              var content;

                 content += "<a href=\"/Group/TopicEdit.aspx?gid="+gid+"&tid="+tid+"\"><font style=\"color:Green\">修改</font></a><br>";

                 content += "<a href=\"/Group/TopicDel.aspx?gid="+gid+"&tid="+tid+"\"><font style=\"color:Green\">删除</font></a><br>";

                 content += "<a href=\"/Group/ReplyAdd.aspx?gid="+gid+"&tid="+tid+"\"><font style=\"color:Green\">回复</font></a><br>";

              
              dropdown(point[0]-16, point[1],content);
              
              
           }
	
			</script>
        <%csharp%>}<%/csharp%>
        
        <div id="popup" style="height:0px;width:0px;border:0px"></div><div id="dropdownDiv" style="display:none;visibility:hidden"></div>
        
        <%csharp%> foreach(ReplyInfo item in ReplyList) { <%/csharp%>
        <table cellspacing="0" cellpadding="0">
	    <thead>
		    <tr>
			    <td colspan="2">																																									
				<strong>
				    <%csharp%>if(item.ReplyFloorNo >=1) { <%/csharp%>
				        RE：<span>第{item.ReplyFloorNo} 楼</span>
				    <%csharp%> } else{<%/csharp%>
				    RE：<span>{TopicData.Title}</span></strong>
				      <%csharp%> }<%/csharp%>
		    </tr>
	    </thead>
	    <tbody>
		<tr>
			<th>
				
				<%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.PostUserId; <%/csharp%>
				<a href="{this.GetUrl(TempUrl)}" class="user_img" target="_blank"><img src="{item.ReplyAvatar}" width="100px" height="100px"/></a>
				
				<h1><a class="link_strong"  href="{this.GetUrl(TempUrl)}" target="_blank">{item.PostUserName}</a></h1>
				
				<%csharp%>
				string province=UserBLL.Instance.GetUserInfo(item.PostUserId).Province;
				string city=UserBLL.Instance.GetUserInfo(item.PostUserId).City;
				<%/csharp%>
				<%if province!=""||city!=""%>
				<p>({province}&nbsp;{city})</p>
				<%/if%>
				
				
				<p>性别：{item.ReplyGender}&nbsp;&nbsp;年龄：<%if item.ReplyAge<208&&item.ReplyAge>0%>{item.ReplyAge}<%else%>未知<%/if%></p>
				<p>
				<%csharp%>TempUrl = "/User/FriendAdd.aspx?uid=" + item.PostUserId;<%/csharp%>
  			    <a href="javascript:showFriendRequestDialog('{item.PostUserId}','{item.PostUserName}','{item.ReplyAvatar}');"class="addfriend">加为好友</a>
  			    <%csharp%>TempUrl = "/User/PostPm.aspx?msgto=" + item.PostUserId;<%/csharp%>
				<a href="{GetUrl(TempUrl)}"class="sendpm" target="_blank">发送消息</a>
				 </p>
			</th>
			<td>
				<div class="list_inside">
				<%csharp%>if(item.ReplyFloorNo >=1) { <%/csharp%>

				       <b>[回复第{item.ReplyFloorNo} 楼 {ReplyList[item.ReplyFloorNo].PostUserName}]</b>
				         <%csharp%> } <%/csharp%>
				      <br /> 
				<%if item.IsDel==1%>该回复已被删除<%else%>
				{item.Body}<br />附件：<a href="{item.ReplyFile}">{item.ReplyFileName}</a><%/if%></div>				
			</td>
		</tr>
	    </tbody>
	    <tfoot>
		<tr>
			<th>{item.FloorNo} 楼</th>
			<td>
			<%if item.IsDel!=1%>
				<span>
					<%csharp%>if(CanEdit(item)) { <%/csharp%>
                    <%csharp%>TempUrl = "/Group/ReplyEdit.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id + "&rid=" + item.Id; <%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"><font style="color:Green">修改</font></a>
                    <%csharp%> } <%/csharp%>
                    &nbsp;&nbsp;
                    <%csharp%>if(CanDelete(item)) { <%/csharp%>
                    <%csharp%>TempUrl = "/Group/ReplyDel.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id + "&rid=" + item.Id; <%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"><font style="color:Green">删除</font></a>
                    <%csharp%> } <%/csharp%>
                     &nbsp;&nbsp;
        
                    <%csharp%>if(CanReply(item)) { <%/csharp%>
                    <%csharp%>TempUrl = "/Group/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id + "&rid=" + item.Id; <%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"><font style="color:Green">回复</font></a>
                    <%csharp%> } <%/csharp%>    
			    </span>
			 <%/if%> 
			    <%csharp%>TempUrl = TopicData.PostTime.ToString("yyyy-MM-dd hh:mm"); <%/csharp%>
				<em class="color_weak">发表日期：{TopicData.PostTime}</em>
			</td>
		</tr>
	    </tfoot>
        </table>
        <%csharp%> } <%/csharp%>
        </div>
        <div class="gap15"></div>
        
        <%csharp%>TempUrl = ModuleCtrl.Footer("moduleTopic"); <%/csharp%>
        {TempUrl}   
        
        <div class="box">
      <div class="content">
      
      <div class="newtopic">
      <%csharp%>TempUrl = "/Group/TopicAdd.aspx?gid=" + GroupData.Id; <%/csharp%>
      <a href="{GetUrl(TempUrl)}"><span  onmouseout="this.className='new_sbt'" onmouseover="this.className='new_sbt_h'" onclick="SubmitForm('3');" class="new_sbt">发新话题</span></a>
      
      
      <%csharp%>TempUrl = "/Group/ReplyAdd.aspx?gid=" + GroupData.Id+"&tid=" + TopicData.Id; <%/csharp%>
      <a href="{GetUrl(TempUrl)}"><span  onmouseout="this.className='new_sbt'" onmouseover="this.className='new_sbt_h'" onclick="SubmitForm('3');" class="new_sbt">回复</span></a>
      </div>
      
      <div style="float:right;">
      <div class="pages">{PagingString}</div>
      </div>
           <div style=" clear:both;"></div>
      </div>
      </div>
        
   <%csharp%>TempUrl = ModuleCtrl.Header4("reply","快速回复",false,false); <%/csharp%>
        {TempUrl}   
            
            <div class="content">
            <br />
            <%csharp%>if(UserData.Id > 0) { <%/csharp%>
               
               <%csharp%>TempUrl="/Group/ReplyAdd.aspx?gid="+GroupData.Id+"&tid="+TopicData.Id;<%/csharp%>
                <form id="replyform" name="replyform" action="{this.GetUrl(TempUrl)}" method="post">
                    
                <input type="hidden" name="uid" value="" />
                <table><tr><td>
                     <textarea id="uchome-ttHtmlEditor" name="rbody" cols="90" rows="15" style="display:none"></textarea> 
                            <iframe src="/support/editor/editor.htm" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:600px;border: 1px solid #C5C5C5;" height="300"></iframe>
                </td></tr>
                <tr height="15"><td></td></tr>
                <tr><td align="right">
                    <span  onmouseout="this.className='new_sbt'" onmouseover="this.className='new_sbt_h'" onclick="javascript:edit_save();_$('replyform').submit();" class="new_sbt">提交</span>
                </td></tr></table>
                
                </form>    
                
                <br />
                
                <span id="cmtstate"></span>
                
                <%csharp%> } else { <%/csharp%>
            <%csharp%>TempUrl = "/User/Login.aspx"; <%/csharp%>
            <b>我要说两句</b>.... (请在<a href="{this.GetUrl(TempUrl)}"><b style="color:Red;">登录</b></a>后发表回复)
            <%csharp%> } <%/csharp%>
                
            </div>
            
            
        <%csharp%>TempUrl = ModuleCtrl.Footer("reply"); <%/csharp%>
        {TempUrl}  
    </div> 
    
    <div class="col2">
    <%template _TopicHottest%>
    
    <%template _TopicLatest%>
    
    <%template _GroupHottest%>
    </div>
    
</div>
 <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
<%template _footer%>